﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeBehind="TieuDoan.aspx.cs" Inherits="WTSQCB.TieuDoan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        &nbsp;
        Tiểu đoàn</p>
<p>
        <asp:GridView ID="TieuDoanGridView1" runat="server" Width="980px" AutoGenerateColumns="False" DataKeyNames="MaTieuDoan" DataSourceID="SqlDataSource1" OnSelectedIndexChanged="TieuDoanGridView1_SelectedIndexChanged" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4">
            <Columns>
                <asp:CommandField ShowSelectButton="True" ButtonType="Button" SelectText="CHỌN" />
                <asp:BoundField DataField="MaTieuDoan" HeaderText="Mã Tiểu đoàn" ReadOnly="True" SortExpression="MaTieuDoan" />
                <asp:BoundField DataField="TenTieuDoan" HeaderText="Tên Tiểu đoàn" SortExpression="TenTieuDoan" />
            </Columns>
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <RowStyle BackColor="White" ForeColor="#003399" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <SortedAscendingCellStyle BackColor="#EDF6F6" />
            <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
            <SortedDescendingCellStyle BackColor="#D6DFDF" />
            <SortedDescendingHeaderStyle BackColor="#002876" />
        </asp:GridView>
</p>
<p>
        &nbsp;
        <asp:Button ID="ThemButton1" runat="server" Text="THÊM" OnClick="ThemButton1_Click" Width="80px" />
        &nbsp;
        <asp:Button ID="SuaButton1" runat="server" Text="SỬA" OnClick="SuaButton1_Click" Width="80px" />
        &nbsp;
        <asp:Button ID="XoaButton2" runat="server" Text="XÓA" OnClick="XoaButton2_Click" OnClientClick="return confirm('Bạn muốn XÓA không ?')" Width="80px"/>
    
</p>
<p>
        &nbsp;
        <asp:Label ID="Label1" runat="server" Text="Mã tiểu đoàn"></asp:Label>
        :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="MaTieuDoanTextBox1" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="MaTieuDoanTextBox1" ErrorMessage="RequiredFieldValidator" ForeColor="Red">Mã tiểu đoàn không được để trống</asp:RequiredFieldValidator>
</p>
<p>
        &nbsp;
        <asp:Label ID="Label2" runat="server" Text="Tên tiểu đoàn"></asp:Label>
        :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="TenTieuDoanTextBox2" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TenTieuDoanTextBox2" ErrorMessage="RequiredFieldValidator" ForeColor="Red">Tên tiểu đoàn không được để trống</asp:RequiredFieldValidator>
</p>
<p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WebDiemTSQCBConnectionString %>" SelectCommand="SELECT * FROM [TieuDoan]"></asp:SqlDataSource>
</p>
</asp:Content>
